
// eslint-disable-next-line @typescript-eslint/no-var-requires
const devServer = require("./config/devServer");

module.exports = {
  css: {
    loaderOptions: {
      // pass Less.js Options to less-loader
      less: {
        // additionalData: `@import "~@/style/global.less";`
        lessOptions: {
          javascriptEnabled: true,
        },
      },
    },
  },
  // 配置转发代理
  devServer: {
    disableHostCheck: true,
    host: devServer.host, // can be overwritten by process.env.HOST
    open: false,
    port: devServer.port, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
    proxy: devServer.proxy,
    overlay: {
      warnings: false,
      errors: true,
    },
  },
};
